package internal

import (
	"fmt"
	"runtime"

	_ "github.com/gogf/gf/contrib/drivers/mysql/v2"
	_ "github.com/gogf/gf/contrib/nosql/redis/v2"

	"github.com/beherochuling/beesoft_api/app/model"

	"github.com/gogf/gf/v2/text/gstr"
)

func init() {
	initEnvironment()
	// initGF()
	initRoute()
	initGoAdmin()
	// initLog()
	// easyOpentracing.Init(model.AppBuildTime)
}

func initEnvironment() {
	_, file, _, ok := runtime.Caller(0)
	if !ok {
		return
	}
	model.BaseCodePath = gstr.Replace(file, "/boot/internal/boot.go", "")
	fmt.Println("BaseCodePath:", model.BaseCodePath)

	model.BasePath = ""
}
